﻿@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@using CleanArchitecture.Infrastructure.Models
@using CleanArchitecture.Core.Helper
@model LoginModel
@{
    Layout = null;
    ViewData["Title"] = "后台登录 >_<";
    object LoginVerifyType = string.Empty;
    Model.CustomProperties.TryGetValue("BackendLoginVerifyType", out LoginVerifyType);
}

<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <title>@ViewData["Title"] - Nowablog</title>
    <environment names="Development">
        <link rel="stylesheet" href="~/css/fonts.css" asp-append-version="true" />
        <link rel="stylesheet" href="~/lib/layui/css/layui.css" asp-append-version="true" />
        <link rel="stylesheet" href="~/css/backend/backlogin.css" asp-append-version="true" />
    </environment>
    <environment names="Staging,Production">
        <link rel="stylesheet" href="~/css/fonts.min.css" asp-append-version="true" />
        <link rel="stylesheet" href="~/lib/layui/css/layui.css" asp-append-version="true" />
        <link rel="stylesheet" href="~/css/backend/backlogin.min.css" asp-append-version="true" />
    </environment>
    <!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style type="text/css">
        .slidesuccessbg{ background-color: #01AAED; }
    </style>
</head>
<body>
    <div class="login-wall">
        <div class="login-left">
            <p style="text-align:center;"><span class="iconfont">Nowablog &copy - (Author)DavidLee 2019-2020</span></p>
            <div class="login-left-bg"></div>
        </div>
        <div class="login-right">
            <input type="text" style="display: none" id="verifytype" value="@LoginVerifyType.ToString()" />
            <form action="/login" id="forms" method="post" class="layui-form">
                <h1>Nowablog-管理登录</h1>
                <div class="cell">
                    <span class="icon-user"></span>
                    <input type="text" name="@Model.nameof(u => u.LoginUser)" id="@Model.nameof(u => u.LoginUser)" lay-verify="required" lay-verType="tips" placeholder="@(ReflectionExtensions.GetPropertyDisplayName<LoginModel>(i => i.LoginUser))" autocomplete="off">
                </div>
                <div class="cell">
                    <span class="icon-pwd"></span>
                    <input type="password" name="@Model.nameof(u => u.Password)" id="@Model.nameof(u => u.Password)" lay-verify="required" lay-verType="tips" placeholder="@(ReflectionExtensions.GetPropertyDisplayName<LoginModel>(i => i.Password))" autocomplete="off">
                </div>
                @if (LoginVerifyType.ToString() == "captcha")
                {
                <div class="cell">
                    <i class="layui-icon layui-icon-auz"></i>
                    <div class="layui-input-inline" style="width: 265px;">
                        <input placeholder="@(ReflectionExtensions.GetPropertyDisplayName<LoginModel>(i => i.CaptchaCode))" id="CaptchaCode" name="@Model.nameof(m => m.CaptchaCode)" style="float: left; width: 120px;" type="text" lay-verify="required" class="layui-input" maxlength="4" autocomplete="off"/>
                        <a href="javascript:;" style="float: left; width: 120px;"><img id="img-captchacode" src="/get-captcha-code" /></a>
                    </div>
                </div>
                }
                else if (LoginVerifyType.ToString() == "slider")
                {
                    <div class="layui-form-item">
                        <label class="layui-form-label" style="width: 80px; text-align: left;">滑动验证</label>
                        <div class="layui-input-block" style="margin-left: 95px;"><div id="slider"></div></div>
                    </div>
                    <hr class="hr15">
                }
                <div class="login-tip"><span></span></div>
                @*<div style="font-size:12px; color:#777; display:none;">测试账号密码都是：demo888</div>*@
                <div class="login-btn">
                    <button id="loginsubmit" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="login">登录</button>
                    <button type="button" id="reset" class="layui-btn layui-btn-danger">重置</button>
                </div>
            </form>
        </div>
        <div class="layui-clear"></div>
    </div>
    <environment names="Development">
        <script src="~/lib/fetch/fetch.js" type="module" asp-append-version="true"></script>
        <script src="~/lib/jquery/dist/jquery.js" asp-append-version="true"></script>
        <script src="~/js/util.js" asp-append-version="true"></script>
        <script src="~/lib/layui/layui.js" asp-append-version="true"></script>
        <script src="~/js/backend/layuiconfig.js" asp-append-version="true"></script>
        <script src="~/js/backend/backendlogin.js" asp-append-version="true"></script>
    </environment>
    <environment names="Staging,Production">
        <script src="~/lib/fetch/fetch.min.js" type="module" asp-append-version="true"></script>
        <script src="~/lib/jquery/dist/jquery.min.js" asp-append-version="true"></script>
        <script src="~/js/util.min.js" asp-append-version="true"></script>
        <script src="~/lib/layui/layui.js" asp-append-version="true"></script>
        <script src="~/js/backend/layuiconfig.js" asp-append-version="true"></script>
        <script src="~/js/backend/backendlogin.min.js" asp-append-version="true"></script>
    </environment>

</body>
</html>

